local uri = ngx.var.request_uri
local newUrl = "/rest/group/capacity/handle?bridgeUri=";

---找到问号所在位置
index = string.find(uri,"?")
---获取问号后面内容
local queryStr ;
local preUrl;
if index~=nil then
    preUrl  = string.sub(uri,0,index-1)

    queryStr = string.sub(uri,index,#uri);
    print("preUrl" ..preUrl);
    print("queryStr"..queryStr);

    newUrl = newUrl..preUrl.."&"..queryStr;
    print("newUrl"..newUrl)
else
    newUrl = newUrl..preUrl;
end
    ngx.var.mypath= newUrl;

return
